/*
 * Copyright © 2022 XXXXXXXXX
 * @Author: zhangxiang
 * @Date: 2022-07-19 09:42:10
 * @LastEditors: zhangxiang
 * @LastEditTime: 2022-11-01 11:17:47
 * @Description:
 *
 */

import { getStorage, removeStorage, setStorage } from '@/utils/storage'

const KEY_TOKEN = 'access_token' // token的key

/**
 * @description: 移除token
 * @return {*}
 */
export function removeToken() {
  removeStorage(KEY_TOKEN)
}

/**
 * @description: 获取token
 * @return {*}
 */
export function getToken() {
  return getStorage(KEY_TOKEN)
}

/**
 * @description: 存储token
 * @param {*} data
 * @return {*}
 */
export function setToken(data) {
  return setStorage(KEY_TOKEN, data)
}
